@extends('admin.master')

@section('top')
	<div class="top-breadcrumb pull-left">{!! Breadcrumbs::render() !!}</div>
	<div class="top-btn-group pull-right">
		<a href="{{ route('admin.reply.create') }}" class="btn btn-primary">添加菜单</a>
	</div>
@endsection

@section('content')
{!! Form::open(['url'=>'admin/menu/sort']) !!}
	<table class="table table-hover table-list">
		<thead>
			<tr>
				<th width="65">顺序</th>
				<th>客户名称</th>
				<th>最后回复</th>
				<th>回复时间</th>
				<th>数量</th>
				<th class="text-right">操作</th>
			</tr>
		</thead>
		<tbody>
		@foreach ($data as $value)
			<tr>
				<td>{{ $i++ }}</td>
				<td><a href="http://{{ $value->domain }}" target="_blank">{{ $value->order->customer->name }}</a></td>
				<td>{{ $value->user->name }}</td>
				<td>{{ $value->created_at->diffForHumans() }}</td>
				<td><span class="label label-primary">{{ $value->count }}</span></td>
				<td class="text-right">
					<div class="toolbar">
						<a href="{{ route('admin.order.show', $value->id) }}" class="btn-link">查看</a>
						<span class="text-explode ">|</span>
						<a href="javascript:void(0);" data-id="{{ $value['id'] }}" class="btn-link delete-item">删除</a>
					</div>
				</td>
			</tr>
		@endforeach
		</tbody>
	</table>
{!! Form::close() !!}
@endsection

@section('foot')
<script src="{{ url('js/bootstrap.min.js') }}"></script>
@endsection